package com.example.newYear.singleton.configuration;

import java.util.HashMap;
import java.util.Map;

public class ConfigurationManager {

    private static final ConfigurationManager instance = new ConfigurationManager();

    private Map<String, String> configurationMap = new HashMap<>();
    private ConfigurationManager() {
        //加载配置文件或从环境变量等获取配置信息
        configurationMap.put("server.port", "8080");
        configurationMap.put("cache.expire.time", "3600");
    }

    public static ConfigurationManager getInstance() {
        return instance;
    }

    public String getConfigValue(String key) {
        return configurationMap.get(key);
    }
}
